import styled from 'styled-components'

export const TopLisItemtWrapper = styled.div`
  width: 230px;
  &:last-child {
    width: 228px;
  }

  .header {
    height: 100px;
    display: flex;
    .image {
      width: 80px;
      height: 80px;
      position: relative;
      overflow: hidden;
      img {
        width: 100%;
        height: 100%;
      }
      a {
        position: absolute;
        left: 0;
        top: 0;
        width: 80px;
        height: 80px;
        background-position: -145px -57px;
      }
    }
  }

  .info {
    margin: 5px 0 0 10px;
    .name {
      font-size: 14px;
      color: #333;
      font-weight: 700;
      &:hover {
        cursor: pointer;
        text-decoration: underline;
      }
    }
    .btn {
      display: inline-block;
      text-indent: -9999px;
      width: 22px;
      height: 22px;
      margin: 8px 10px 0 0;
      cursor: pointer;
    }
    .play {
      background-position: -267px -205px;
      &:hover {
        background-position: -267px -235px;
      }
    }
    .favor {
      background-position: -300px -205px;
      &:hover {
        background-position: -300px -235px;
      }
    }
  }

  .list {
    .list-item {
      position: relative;
      display: flex;
      align-items: center;
      height: 32px;
      color: #000;
      padding: 0 15px;
      :nth-child(-n + 3) .rank {
        color: #c10d0c;
        font-size: 16px;
      }
      .rank {
        width: 35px;
        text-align: center;
        font-size: 16px;
        color: #666;
      }
      .name {
        flex: 1;
        ${(props) => props.theme.mixin.textNoWrap}
        &:hover {
          text-decoration: underline;
          cursor: pointer;
        }
      }
      .operator {
        width: 82px;
        display: flex;
        align-items: center;
        display: none;
        .btn {
          width: 17px;
          height: 17px;
          margin-left: 8px;
          cursor: pointer;
        }
        .play {
          background-position: -267px -268px;
        }
        .add {
          position: relative;
          top: 2px;
          background-position: -22px -700px;
        }
        .favor {
          background-position: -297px -268px;
        }
      }
      &:hover {
        .operator {
          display: block;
        }
      }
    }
  }

  .footer {
    height: 32px;
    display: flex;
    align-items: center;
    margin-right: 32px;
    justify-content: flex-end;

    a {
      color: #000;
      &:hover {
        text-decoration: underline;
      }
    }
  }
`
